Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate test mmdb files with go mmdbwriter. #122

Merged
merged 6 commits into from
Oct 20, 2023

Conversation

NajiObeid
Copy link
Contributor

This PR includes the new go tool and includes the regenerates the test files.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link
Member

@oschwald oschwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I had two tiny comments.

"static_ip_score":
return mmdbtype.Float64(v), nil
default:
return mmdbtype.Float64(v), nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to return an error here? I think we would want to force people to think about what they should do with an unknown numeric type generally as most of the time it shouldn't be a double.

"en": "MaxMind DB Decoder Test database - contains every MaxMind DB data type",
},
DisableIPv4Aliasing: false,
DisableMetadataPointers: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could drop this for all the writers. The reason is that we want people to support metadata pointers in their reader implementation. The databases we generate internally sometimes enable this as some readers did not in the past.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's what I originally did, but I changed my mind when I found out that there's a test db specific for metadata pointers, and thought that having a differentiator might be beneficial. But it doesn't really help now that I think more about it!

@oschwald oschwald merged commit b45a10b into main Oct 20, 2023
9 checks passed
@oschwald oschwald deleted the nobeid/port-build-script-to-go branch October 20, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants